﻿using Demo_Excel列表框.Service;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Demo_Excel列表框
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            DataContext = ViewModel.ViewModel.GetInstance().m_Model_MainWindow;
        }

        private void RadioButton_Tab_Click(object sender, RoutedEventArgs e)
        {
            RadioButton rb = sender as RadioButton;
            int nIndex = int.Parse(rb.Name.Substring(3, 1));
            System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)delegate ()
            {
                Interface_1.Visibility = nIndex == 1 ? Visibility.Visible : Visibility.Hidden;
                Interface_2.Visibility = nIndex == 2 ? Visibility.Visible : Visibility.Hidden;
                Interface_3.Visibility = nIndex == 3 ? Visibility.Visible : Visibility.Hidden;
            });
        }

    }
}
